@SET FeatTitle=ScheduleAlertJob
@SET SiteUrl="http://chofu:1234"
@SET SolutionName="Schedule Alert Feature.wsp"
@SET DeployOptions=-allowgacdeployment -immediate
@SET oldpath=%path%
@SET path=%path%;%programfiles%\common files\microsoft shared\web server extensions\12\bin


@echo Deactivating and uninstall features
stsadm -o deactivatefeature -name %FeatTitle% -force -url %SiteUrl%
stsadm -o uninstallfeature -name %FeatTitle% -force

stsadm -o retractsolution -name %SolutionName% -immediate
stsadm -o deletesolution -name %SolutionName% 


@echo Installing solution
stsadm -o addsolution -filename %SolutionName%
stsadm -o deploysolution -name %SolutionName% %DeployOptions%


@echo Installing and activating features
stsadm -o activatefeature -name %FeatTitle% -url %SiteUrl%


@echo Restarting web server

iisreset

@pause Finished. Press any key...
@set path=%oldpath%